package net.zjitc.android2019.ch3storage;

import android.content.Intent;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;

import net.zjitc.android2019.R;

public class Ch3StorageActivity extends AppCompatActivity {
    Button btn1,btn2,btn3;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_ch3_storage);
        btn1=findViewById(R.id.ch3_storage_btn1);
        btn2=findViewById(R.id.ch3_storage_btn2);
        btn3=findViewById(R.id.ch3_storage_btn3);
        View.OnClickListener listener=new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Intent intent=null;
                switch (v.getId()){
                    case R.id.ch3_storage_btn1:
                        intent=new Intent(Ch3StorageActivity.this,Ch3SPActivity.class);
                        break;
                    case R.id.ch3_storage_btn2:
                        intent=new Intent(Ch3StorageActivity.this,Ch3FileInnerActivity.class);
                        break;
                    case R.id.ch3_storage_btn3:
                        intent=new Intent(Ch3StorageActivity.this,Ch3FileOuterActivity.class);
                        break;
                }
               startActivity(intent);
            }
        };
        btn1.setOnClickListener(listener);
        btn2.setOnClickListener(listener);
        btn3.setOnClickListener(listener);


    }
}
